from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.urls import path

from web.views import index
from web.views.line1 import line1_home
from web.views.line2 import line2_home
from web.views.line3 import line3_home
from web.views.line4 import line4_home
from web.apis import Collection
urlpatterns = [

    path('api/not_login/collection/create/', Collection.create_collection), # 创建收藏夹
    path('api/not_login/collection/item/create/', Collection.create_collection_item), # 创建收藏夹项目
    path('api/not_login/collection/item/list/', Collection.get_collection_item_list), # 获取收藏夹项目列表





    path('', index.index), # 网站首页
    path('web/index/', index.index), # 网站首页
    
    path('web/me/', index.me), # 我
    path('web/my_collection/', index.my_collection), # 我的收藏

    path('web/line1/index/', line1_home.index), # 线路1首页
    path('web/line1/detail/', line1_home.detail), # 线路1详情

    path('web/line2/index/', line2_home.index), # 线路2首页
    path('web/line2/detail/', line2_home.detail), # 线路2详情

    path('web/line3/index/', line3_home.line3_home), # 线路3首页
    path('web/line3/detail/', line3_home.line3_detail), # 线路3详情

    path('web/line4/index/', line4_home.line4_home), # 线路4首页
    path('web/line4/detail/', line4_home.line4_detail), # 线路4详情
]
# 添加媒体文件URL配置
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)